export class usergroup {
  id?: number;
  name = '';
                    groupName=''
        constructor(data?: usergroup) {
    data && this.setProps(data);
  }

  setProps(data: usergroup) {
    (Object.keys(this) as Array<keyof Iusergroup>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type Iusergroup = Omit<usergroup, 'setProps'>